package com.uwlaser.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.*;
import com.uwlaser.base.CommonEntity;
import com.uwlaser.base.CommonModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author yangwei
 * @create 2022/10/13
 */
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName(value = "anton_config",schema="uw_mes")
public class AntonConfig extends  CommonEntity<AntonConfig> implements Serializable {

    private static final long serialVersionUID = 1L;
    /** ID */
    @TableId(type= IdType.AUTO)
    private Integer id ;

    @ApiModelProperty(value = "安东编码")
    private String antonCode ;

    @ApiModelProperty(value = "安东类型名称")
    private String antonTypeName ;

    @ApiModelProperty(value = "安东事件")
    private String antonEvent ;

    @ApiModelProperty(value = "描述")
    private String description ;

    @ApiModelProperty(value = "级别")
    private String level ;

    /**
     * 模式，1：手动安东，2：自动安东
     */
    @ApiModelProperty(value = "模式")
    private String model ;

    /**
     * '0'禁用/'1'启用
     */
    @ApiModelProperty(value = "是否禁用")
    private String isDisable ;


    public void copyFrom(AntonConfig source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
